__author__ = 'zoulida'
import tkinter as tk

def getDisplay():
    root = tk.Tk()
    print(root.winfo_screenwidth())
    print(root.winfo_screenheight())
    root.destroy()
def setDisplay():
    import win32api
    dm = win32api.EnumDisplaySettings(None, 0)

    dm.PelsHeight = 720

    dm.PelsWidth = 1280

    dm.BitsPerPel = 32

    dm.DisplayFixedOutput = 0

    win32api.ChangeDisplaySettings(dm, 0)


getDisplay()